package com.itheima.mapper;

import com.itheima.pojo.Role;
import com.itheima.pojo.Setmeal;
import com.itheima.pojo.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserMapper {
    User findByUsername(@Param("username") String username);

//以下为新增
    List<Setmeal> findByCondition(@Param("queryString") String queryString);

    List<Role> findAllRole();

    void add(User user);

    void setUserAndRole(@Param("roleIds") Integer[] roleIds, @Param("id") Integer id);

    List<Integer> findRoleIdsByUserId(@Param("id") Integer id);

    void deleteAssociation(@Param("id") Integer id);

    void edit(User user);

    Integer testUsername(@Param("username") String username);

    void daleteById(@Param("id") Integer id);
}
